voice string (63) specifys the voice you want to use.
reference integer returns a number you need with other functions
to specify which channel you want to operate on.
Returns zero if an error occured.
err integer returns the error which occured.
A value of zero indicates no error occured. See
below for a list of possible errors.
Sets up a speech channel and returns a reference number for you to use later with other functions, i.e. to specify text you want to be spoken.
There can be a maximum of ten open speech channels, if you try to open more an error will be returned (-241). This is a limit imposed by the external and can easily be increased but it seems enough to me. The number of open channels is also limited to the memory available, and this limit can be reached before the maximum number of channels. You are allowed to open more than one channel using the same voice.
Do not save the reference anywere because it is only valid until the speech channel is closed (except with SP Voice busy). Also don't assume it will always be a number within a certain range, this has changed in the past and may change again in the future. But it is save to assume a valid reference value will be anything but zero. If you try to open a speech channel (e.g. in the startup procedure) and this fails an error will be returned and the reference value will be set to zero so you can test for this later.
With every voice you open the external attaches a dictionary to the speech channel. If the external only fails to open the dictionary no error will be returned.
Use SP Close Voice to dispose the speech channel opened with SP OpenVoice.
Examples:
`if you use one of these in the Startup procedure you can use
`$speechref anywere in the data-base to speak the text
$err := SP Open Voice ("*"; $speechref)
$err := SP Open Voice ("Marvin"; $speechref)
$err := SP Open Voice ($voicename; $speechref)
Possible errors:
0 No Error
-4 Speech Pack can not be used (Speech Mgr not available)
-50 Parameter error (inside external, not necessarily the
parameters you pass)
-108 Not enough memory to load voice into memory
-241 Could not open another speech synthesizer channel (perhaps